Enhancement/run app via package installation #123
Draft
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Issue
Closes #122
Description
This changes brings ability to run the app after installing the package - without cloning the repository.
Changes:
...
to the signature to be able to pass arguments toshiny::runApp()
such as host, port, etcrequire()
insider the function to load all required librariesinst
folder, so that it can be properly loaded by the packageDefinition of Done
pak::pak("pharmaverse/aNCA")
aNCA::run_app()
How to test
Single command to test the app via package installation (requires docker):
docker run --rm -it -p 3838:3838 rocker/r-ver:latest bash -c "apt update && apt install libcurl4-openssl-dev && Rscript -e \"install.packages('pak'); pak::pak('pharmaverse/aNCA@enhancement/run-app-via-package-installation')\" && Rscript -e \"aNCA::run_app(host='0.0.0.0',port=3838)\""
Alternatively, install the package in your environment via pak from this branch:
Contributor checklist
Notes to reviewer
Please perform the functional testing rigorously - I only tested it with the slopes - area, that I am somewhat familiar with. There might be a chance that some packages were not properly put into the NAMESPACE, and due to that are not loaded in the app.